package com.huoyun.car.dao;

import com.huoyun.base.dao.BaseDaoImpl;
import com.huoyun.car.bean.Car;
import com.huoyun.car.bean.CarOwner;

public class CarOwnerDaoImpl extends BaseDaoImpl<CarOwner> implements CarOwnerDao{

	public void saveCarOwner(CarOwner carOwner) 
	{
		this.sqlSessionTemplate.insert("com.huoyun.car.dao.CarOwnerDaoMapper.saveCarOwner", carOwner);
	}

	public void updateAll(CarOwner carOwner)
	{
		this.sqlSessionTemplate.update("com.huoyun.car.dao.CarOwnerDaoMapper.updateAll",carOwner);
	}
	
	public CarOwner getCarOwnerById(int ownerId)
	{
		return this.sqlSessionTemplate.selectOne("com.huoyun.car.dao.CarOwnerDaoMapper.getCarOwnerById",ownerId);
	}
	
	public void delete(int ownerId)
	{
		this.sqlSessionTemplate.delete("com.huoyun.car.dao.CarOwnerDaoMapper.delete",ownerId);
	}
}
